package Test;

import Model.DAO.BaseDao;
import Model.Entity.Commodity;

import java.io.PrintWriter;
import java.lang.reflect.Field;
import java.sql.DriverManager;

public class Test {


    public static void main(String[] args) {
        try {
            String name = "Model.Entity.Admins";
            Class claz = Class.forName(name);
            Object cc = claz.newInstance();
            Field field = claz.getDeclaredField("id");
            field.setAccessible(true);
            Object ss = new String("fuck");
            System.out.println(ss.getClass().getTypeName());
            field.set(cc,ss);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public static  <T> T cast(Object obj, Class<T> clazz) { return (T) obj; }
}
